package com.generic.potential.type.demo2;

import java.util.ArrayList;
import java.util.List;

import com.generic.genericinterface.demo1.Coffee;
import com.generic.genericinterface.demo1.Latte;
import com.generic.genericinterface.demo1.Mocha;

public class Test {

	public static void main(String[] args) {
		List<Coffee> carrier = new ArrayList<Coffee>();
		Fill.fill(new Adapter<Coffee>(carrier), Coffee.class, 3);
		Fill.fill(AdapterHelper.collectionAdapter(carrier), Coffee.class, 2);

		for (Coffee coffee : carrier) {
			System.out.println(coffee);
		}

		System.out.println("=========================");

		SimpleQueue<Coffee> carrier2 = new SimpleQueue<Coffee>();
		Fill.fill(carrier2, Mocha.class, 4);
		Fill.fill(carrier2, Latte.class, 1);

		for (Coffee coffee : carrier2) {
			System.out.println(coffee);
		}
	}

}
